home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1993 July / Internet Tools.iso / RockRidge / mail / elm / elm2.4 / lib / Makefile.SH < prev    next >
Encoding:
Makefile  |  1993-04-11  |  7.4 KB  |  330 lines

  1. case $CONFIG in
  2. '')
  3.     if test ! -f config.sh; then
  4.     ln ../config.sh . || \
  5.     ln ../../config.sh . || \
  6.     ln ../../../config.sh . || \
  7.     (echo "Can't find config.sh."; exit 1)
  8.     fi
  9.     . ./config.sh
  10.     ;;
  11. esac
  12. case "$0" in
  13. */*) cd `expr X$0 : 'X\(.*\)/'` ;;
  14. esac
  15.  
  16. case "$d_usenls" in
  17. define)    mcsrc="mcprt.c mcprtlib.c msgcat.c"
  18.     mcobj="mcprt.o mcprtlib.o msgcat.o"
  19.     ;;
  20. *)    mcsrc= mcobj= ;;
  21. esac
  22.  
  23. case "$d_strstr" in
  24. define)    strsrc= strobj= ;;
  25. *)    strsrc="strstr.c"
  26.     strobj="strstr.o"
  27.     ;;
  28. esac
  29.  
  30. case "$d_strftime" in
  31. define)    ftimesrc= ftimeobj= ;;
  32. *)    ftimesrc="strftime.c"
  33.     ftimeobj="strftime.o"
  34.     ;;
  35. esac
  36.  
  37. echo "Extracting lib/Makefile (with variable substitutions)"
  38. cat >Makefile <<!GROK!THIS!
  39. # $Id: Makefile.SH,v 5.11 1993/04/12 01:51:42 syd Exp $
  40. #
  41. #  Makefile for the ELM mail program.
  42. #
  43. #    Copyright (c) 1986,1987 Dave Taylor
  44. #    Copyright (c) 1988-1992 USENET Community Trust
  45. #
  46. # Bug reports, patches, comments, suggestions should be sent to:
  47. #
  48. #    Syd Weinstein - elm@DSI.COM
  49. #            dsinc!elm
  50. #
  51. # $Log: Makefile.SH,v $
  52. # Revision 5.11  1993/04/12  01:51:42  syd
  53. # Added safe_malloc(), safe_realloc(), and safe_strdup().  They
  54. # will be used in the new elmalias utility.
  55. # From: chip@chinacat.unicom.com (Chip Rosenthal)
  56. #
  57. # Revision 5.10  1993/02/03  16:21:03  syd
  58. # add strtokq
  59. # From: Syd
  60. #
  61. # Revision 5.9  1993/01/27  18:52:03  syd
  62. # add strftime as optional component
  63. #
  64. # Revision 5.8  1993/01/19  05:07:05  syd
  65. # Trim erroreous extra log entry
  66. # From: Syd
  67. #
  68. # Revision 5.7  1993/01/19  04:47:12  syd
  69. # Significant changes to provide consistent Date and From_ header
  70. # cracking.  Overhauled date utilities and moved into library.  Moved
  71. # real_from() into library.  Modified frm, newmail, and readmsg utilities
  72. # to use library version of real_from().  Moved get_word() from Elm
  73. # source into library.  Added new library routines atonum() and strfcpy().
  74. # Fixed trailing backslash bug in len_next().
  75. # From: chip@chinacat.unicom.com (Chip Rosenthal)
  76. #
  77. # Revision 5.6  1992/12/24  19:33:59  syd
  78. # tune dependency list further
  79. # From: Syd
  80. #
  81. # Revision 5.5  1992/12/24  19:30:46  syd
  82. # Make all object depend on config.h, so a reconfig for a new
  83. # arch in shared sources (or copied sources) forces a recompile
  84. # of all modules.
  85. # From: Syd
  86. #
  87. # Revision 5.4  1992/12/20  05:15:58  syd
  88. # Add a c)hange alias, -u and -t options to listalias to list only user
  89. # and only system aliases respectively.
  90. # From: "Robert L. Howard" <robert.howard@matd.gatech.edu>
  91. #
  92. # Revision 5.3  1992/11/07  20:07:23  syd
  93. # Add header_cmp routine
  94. # From: Syd
  95. #
  96. # Revision 5.2  1992/10/27  01:43:40  syd
  97. # Move posix_signal to lib directory
  98. # From: tom@osf.org
  99. #
  100. # Revision 5.1  1992/10/03  22:41:36  syd
  101. # Initial checkin as of 2.4 Release at PL0
  102. #
  103. #
  104. #
  105. # Variables
  106. #    Variables established by Configure
  107. AR        =    ar
  108. CC        =    $cc
  109. CCFLAGS        =    $ccflags $xencf
  110. CHMOD        =    $chmod
  111. LINT        =    $lint
  112. OPTIMIZE    =    $optimize
  113. RANLIB        =    $ranlib
  114. RM        =     $rm -f
  115. TOUCH        =    $touch
  116. TAGS        =    ctags
  117.  
  118. MCSRC        =    $mcsrc
  119. MCOBJ        =    $mcobj
  120.  
  121. STRSRC        =    $strsrc
  122. STROBJ        =    $strobj
  123.  
  124. FTIMESRC    =    $ftimesrc
  125. FTIMEOBJ    =    $ftimeobj
  126.  
  127. !GROK!THIS!
  128.  
  129. cat >>Makefile <<'!NO!SUBS!'
  130.  
  131. #    Variables you may want to manually edit
  132. #        If you want debug logging then you'll
  133. #        want to uncomment the following.
  134. #DEBUG        =    -DDEBUG
  135.  
  136. #        If you're on an ACSnet system (Australia) then
  137. #        you'll want to uncomment the following.
  138. # DACSNET    =    -DACSNET
  139.  
  140. #    Other general variables
  141. CFLAGS        =    $(CCFLAGS) $(OPTIMIZE) -I$(INCLDIR) $(DEBUG) $(DACSNET) 
  142. INCLDIR        =    ../hdrs
  143. LINTFLAGS    =    -I$(INCLDIR)
  144. SHELL        =    /bin/sh
  145.  
  146. #     Lists
  147. LIB_SRC        =    add_site.c    \
  148.             addrmchusr.c    \
  149.             atonum.c    \
  150.             mk_aliases.c    \
  151.             aliasdb.c    \
  152.             mk_lockname.c    \
  153.             can_access.c    \
  154.             can_open.c    \
  155.             chloc.c        \
  156.             date_util.c    \
  157.             errno.c        \
  158.             expand.c    \
  159.             figadrssee.c    \
  160.             gcos_name.c    \
  161.             getaddrfrm.c    \
  162.             getarpdate.c    \
  163.             getfullnam.c    \
  164.             getword.c    \
  165.             header_cmp.c    \
  166.             in_list.c    \
  167.             in_string.c    \
  168.             istrcmp.c    \
  169.             ldstate.c    \
  170.             len_next.c    \
  171.             mail_gets.c    \
  172.             $(MCSRC)    \
  173.             move_left.c    \
  174.             ndbz.c        \
  175.             okay_addr.c    \
  176.             opt_utils.c    \
  177.             parsarpdat.c    \
  178.             parsarpwho.c    \
  179.             posixsig.c    \
  180.             putenv.c    \
  181.             realfrom.c    \
  182.             qstrings.c    \
  183.             remfirstwd.c    \
  184.             reverse.c    \
  185.             safemalloc.c    \
  186.             shiftlower.c    \
  187.             strfcpy.c    \
  188.             strincmp.c    \
  189.             striparens.c    \
  190.             $(STRSRC)    \
  191.             $(FTIMESRC)    \
  192.             strtokq.c    \
  193.             tail_of.c    \
  194.             validname.c
  195.  
  196. LIB_OBJ        =    add_site.o    \
  197.             addrmchusr.o    \
  198.             atonum.o    \
  199.             mk_aliases.o    \
  200.             aliasdb.o    \
  201.             mk_lockname.o    \
  202.             can_access.o    \
  203.             can_open.o    \
  204.             chloc.o        \
  205.             date_util.o    \
  206.             errno.o        \
  207.             expand.o    \
  208.             figadrssee.o    \
  209.             gcos_name.o    \
  210.             getaddrfrm.o    \
  211.             getarpdate.o    \
  212.             getfullnam.o    \
  213.             getword.o    \
  214.             header_cmp.o    \
  215.             in_list.o    \
  216.             in_string.o    \
  217.             istrcmp.o    \
  218.             ldstate.o    \
  219.             len_next.o    \
  220.             mail_gets.o    \
  221.             $(MCOBJ)    \
  222.             move_left.o    \
  223.             ndbz.o        \
  224.             okay_addr.o    \
  225.             opt_utils.o    \
  226.             parsarpdat.o    \
  227.             parsarpwho.o    \
  228.             posixsig.o    \
  229.             putenv.o    \
  230.             qstrings.o    \
  231.             realfrom.o    \
  232.             remfirstwd.o    \
  233.             reverse.o    \
  234.             safemalloc.o    \
  235.             shiftlower.o    \
  236.             strfcpy.o    \
  237.             strincmp.o    \
  238.             striparens.o    \
  239.             $(STROBJ)    \
  240.             $(FTIMEOBJ)    \
  241.             strtokq.o    \
  242.             tail_of.o    \
  243.             validname.o
  244.  
  245. all:            libutil.a
  246.  
  247. install:        libutil.a
  248.  
  249. uninstall:        libutil.a
  250.  
  251. libutil.a:        $(LIB_OBJ)
  252.             $(AR) r $@ $?
  253.             $(RANLIB) $@
  254.  
  255. lint:        
  256.         $(LINT) $(LINTFLAGS) $(LIB_SRC) > LINT.OUT
  257.  
  258. tags:
  259.         $(TAGS) $(LIB_SRC)
  260.  
  261. clean:        
  262.         $(RM) $(LIB_OBJ) libutil.a
  263.  
  264. # Dependencies and rules
  265. #    Dependencies of header files upon other header files they include
  266. .PRECIOUS:        $(INCLDIR)/defs.h $(INCLDIR)/elm.h $(INCLDIR)/headers.h
  267.  
  268. $(INCLDIR)/defs.h:    $(INCLDIR)/../config.h $(INCLDIR)/sysdefs.h
  269.             $(CHMOD) u+w $@
  270.             $(TOUCH) $@
  271.  
  272. $(INCLDIR)/elm.h:    $(INCLDIR)/curses.h $(INCLDIR)/defs.h
  273.             $(CHMOD) u+w $@
  274.             $(TOUCH) $@
  275.  
  276. $(INCLDIR)/headers.h:    $(INCLDIR)/curses.h $(INCLDIR)/defs.h
  277.             $(CHMOD) u+w $@
  278.             $(TOUCH) $@
  279.  
  280. #    Dependencies of C object files
  281. add_site.o:    $(INCLDIR)/headers.h
  282. addrmchusr.o:    $(INCLDIR)/headers.h
  283. mk_aliases.o:    $(INCLDIR)/headers.h $(INCLDIR)/ndbz.h $(INCLDIR)/s_newalias.h
  284. aliasdb.o:    $(INCLDIR)/headers.h $(INCLDIR)/ndbz.h
  285. mk_lockname.o:    $(INCLDIR)/headers.h
  286. can_access.o:    $(INCLDIR)/headers.h
  287. can_open.o:    $(INCLDIR)/headers.h
  288. chloc.o:    $(INCLDIR)/headers.h
  289. date_util.o:    $(INCLDIR)/headers.h
  290. errno.o:    $(INCLDIR)/headers.h
  291. expand.o:    $(INCLDIR)/defs.h $(INCLDIR)/s_elmrc.h
  292. figadrssee.o:    $(INCLDIR)/headers.h
  293. gcos_name.o:    $(INCLDIR)/headers.h
  294. getaddrfrm.o:    $(INCLDIR)/headers.h
  295. getarpdate.o:    $(INCLDIR)/headers.h
  296. getfullnam.o:    $(INCLDIR)/headers.h
  297. getword.o:    $(INCLDIR)/defs.h
  298. header_cmp.o:    $(INCLDIR)/headers.h
  299. in_list.o:    $(INCLDIR)/headers.h
  300. in_string.o:    $(INCLDIR)/headers.h
  301. istrcmp.o:    $(INCLDIR)/headers.h
  302. ldstate.o:    $(INCLDIR)/defs.h
  303. len_next.o:    ../config.h
  304. mail_gets.o:    ../config.h
  305. mcprt.o:    $(INCLDIR)/mcprt.h $(INCLDIR)/mcprtlib.h
  306. mcprtlib.o:    $(INCLDIR)/mcprtlib.h $(INCLDIR)/nl_types.h
  307. move_left.o:    $(INCLDIR)/headers.h
  308. msgcat.o:    $(INCLDIR)/msgcat.h $(INCLDIR)/nl_types.h
  309. ndbz.o:        $(INCLDIR)/headers.h $(INCLDIR)/ndbz.h
  310. okay_addr.o:    $(INCLDIR)/headers.h
  311. opt_utils.o:    $(INCLDIR)/headers.h $(INCLDIR)/s_error.h
  312. parsarpdat.o:    $(INCLDIR)/headers.h
  313. parsarpwho.o:    $(INCLDIR)/headers.h
  314. posixsig.o:    $(INCLDIR)/headers.h
  315. putenv.o:    $(INCLDIR)/headers.h
  316. realfrom.o:    $(INCLDIR)/headers.h $(INCLDIR)/s_elm.h
  317. qstrings.o:    ../config.h
  318. remfirstwd.o:    $(INCLDIR)/headers.h
  319. reverse.o:    $(INCLDIR)/headers.h
  320. safemalloc.o:    $(INCLDIR)/defs.h
  321. shiftlower.o:    $(INCLDIR)/headers.h
  322. strincmp.o:    $(INCLDIR)/headers.h
  323. striparens.o:    $(INCLDIR)/headers.h
  324. strstr.o:    $(INCLDIR)/headers.h
  325. strtokq.o:    $(INCLDIR)/headers.h
  326. tail_of.o:    $(INCLDIR)/headers.h
  327. validname.o:    $(INCLDIR)/defs.h
  328.  
  329. !NO!SUBS!
  330.